<template>
  <div id="app">
    <home/>
  </div>
</template>

<script>
import chat from './libs/chat'
import home from './components/home'


export default {
  name: 'App',
  components: {
    home
  },

  methods:{
      getUrlParam(key) {
                let reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
                let result = window.location.search.substr(1).match(reg);
                return result ? decodeURIComponent(result[2]) : "";
      },
  },

  created(){
    let _self = this;
    this.token = this.getUrlParam("token");
    chat.init(this.token);
  }
}
</script>

<style>

body{
  background: #f0f0f0;
  margin: 0;
}

#app {
  font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
